home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
vecanim
/
vecanim.doc
< prev
next >
Wrap
Text File
|
1994-07-31
|
27KB
|
588 lines
VECTOR ANIMATOR
Version 0.9
User's Guide
Copyright (c) 1994 - Bjarke Viksoe
All Rights Reserved
Shareware Version
Released july 1994!
NOTE: The VECTOR ANIMATOR is only for animation and not for creating
new animations. To create your own new animation you should use
the VECTOR BUILDER. It should also be placed on the disk.
WARNING: Disclaimer: If you use this program you cannot hold me
responsible for any damage caused by it on any of your equepment or
your health.
ANOTHER WARNING: This program hasn't been tested at all on any computer
other than my own! I should warn you and confess that my code usually
doesn't work on all other machines. Especially on 80386! I really don't
know why - maybe I'm just another lame programmer.
EXTRA: Source code available. Yes, you can actually get the source code
to this baby for free. Look for my address later.
────────────────────────────────────────────────────────────────────────────
Table of Contents
────────────────────────────────────────────────────────────────────────────
1. Introduction
2. Installation
3. Hardware and Software Requirements
4. What it is
5. Using VECTOR ANIMATOR
5.1 General Behavior
5.2 The Main Screen
5.3 The Editor Screen
5.4 The Keys and IMPORTANT EXTRA FEATURES
6. Technical Stuff
7. Bugs and Wishes
8. The End
────────────────────────────────────────────────────────────────────────────
1. Introduction
────────────────────────────────────────────────────────────────────────────
A long time ago I saw a game called "Another world", which I thought was
the ultimate game! It's wasn't the actual plot or the action-scenes in the
game which thrilled me, but the animations. I'm a big fan of vector (filled
polygon graphics) games - but "Another world" took a brand new edge of this
genre. Using real-time vector-objects instead of graphical sprites was a
brilliant idea, I thought. It takes up much less memory and you can make
extremely smoother and better animations! Of course you cannot have as many
details or colours in each sprites, but this would be compromised by the
better motion and more nifty animations.
So I thought, some day I'm gonna make such a game. Realizing that this
would require some kind of editor I started making one (on my Amiga). This
was a year ago. It was done in 3 days and it looked much like this one -
it was, however, made in pure assembly (aah, delight!).
But then in febuary 1994 I bought my first PC, and when I got a little
bored in my holiday I also made a PC version. It took about 2 weeks to make
it all. And here it is.
VECTOR ANIMATOR was designed for the development of games like "Another
world". It enables you to do advanced animations of vector graphics in
2D using the VGA (video graphics array) 320x200, 256-color mode. The
program employs a graphical user interface (GUI) to invoke menu selections.
You can move the mouse cursor to a menu item and click the left button
of the mouse to select.
Animations are stored onto disk in a simple easy-readable file format.
The file format is revealed in another document, "VECBUILD.DOC".
Welcome to VECTOR ANIMATOR V0.9 !
────────────────────────────────────────────────────────────────────────────
2. Installation
────────────────────────────────────────────────────────────────────────────
VECTOR ANIMATOR takes up about 1/2 Mb of disk space.
To install it on your hard disk drive, type at the DOS prompt:
MD \ANIM
CD \ANIM
PKUNZIP A:VECANIM.ZIP
(If you don't know PKUNZIP then forget the whole thing...)
Then, at last, type at the prompt:
VECANIM
────────────────────────────────────────────────────────────────────────────
3. Hardware and Software Requirements
────────────────────────────────────────────────────────────────────────────
VECTOR ANIMATOR requires version 3.20 or higher version of MS- or PC-DOS,
an IBM or compatible 80386 or above computer with a VGA adapter, a
Microsoft or compatible 2-button mouse, and some 2Mb of memory.
Anyway, you shouldn't plan on making large animations without at least 3Mb.
The animator works best with a hard disk drive and disk caching,
which improves file save/retrieve performance and a computer using VESA bus
architecture which greatly improves the video performance. Slow VGA cards
are not recommended.
Note that VECTOR ANIMATOR utilize a tweaked 320x200 256-color screen for
flicker-free screen updates! Your VGA card must support this! That is,
it must be VGA register compatible.
If you experience any trouble with this software you are encouraged to
notify the developer.
────────────────────────────────────────────────────────────────────────────
4. What It Is
────────────────────────────────────────────────────────────────────────────
(I'm sorry if the desciptions following is a bit confusing or not
completely understandable - but I'm no master at the english language!)
So what is this: Let me put it simple... it's a developer kit to games
featuring 2D solid polygon graphics on a 320x200, 256 colour screen.
It's a simple editor to do advanced 2D polygon animations. Nothing less.
Think of an artist at Disney's Studios. To draw a new cartoon you have
to have a crew of more or less experienced artist (pencil-drawers and
animators). No-one can manage to draw all the thousand of drawings alone.
Instead one (or a few) experienced animators are given the task of drawing
the essential drawings. These are only a little amount of the total
drawings, thus showing rough movement and motion. It is then a less
experienced (and less paid) animator's job to fill in the rest of the
drawings, so that, in the end, you have about 30 drawings for every second.
To get really smooth animations you need to have at least 14 drawings
sweeping in front of your eyes every second in order not to get a jerky
animation. But it is boring to draw so many drawings. The idea with this
program is that the user only creates a few frames and then lets the computer
calculate a number of drawings (steps) between each frame so that you get
a smooth and elegant animation in the end.
Doing this with pixelated pictures is rather difficult, so instead we use
filled polygons (or more popular: vector graphics). Polygons are build from
a number of coordinates which are easily manipulated through mathematical
rules.
Once you have got the program started, you should try to load the "MAN.ANI"
which is an animation of only 4 frames. Try to step through the four
frames. It doesn't really look that great! But after the computer has had
a look at it, it can actually be played smoothly with a total of 23
frames - looking very impressive and quite "Another world" like! ;-)
Take a look for yourself, just press the "PLAY" button.
Also note the size of the .ANI file. Not much, eh?
────────────────────────────────────────────────────────────────────────────
5. Using VECTOR ANIMATOR
────────────────────────────────────────────────────────────────────────────
User's Guide
The program uses selection buttons by which the user will invoke menu
selections. The user can either move the mouse cursor to the item and
click the left button on the mouse. The left button must be released over
the same item.
Most menu-items have a special keyboard shortcut or hotkey. This will enable
users to quickly invoke menu-items by a single keystroke. The key needed to
invoke an item can be seen on the button - where it is marked in the text
with an underscore ('_')!
────────────────────────────────────────────────────────────────────────────
5.1 General Behavior
────────────────────────────────────────────────────────────────────────────
To ease the understanding of this tutorial you should start the program
and fool around a bit, testing stuff and trying everything. This way, it
will be a lot easier to figure out what I actually mean...
There are two screen in the program.
A main screen, from where you can load, save and play animations. You can
also add and delete new frames to your animation.
The other screen is the "editor screen", where you can edit new and old
frames by manipulating one or more of the points (polygon coordinates). This
screen enables you to do complex rotating and scaling (yeah, right!).
Also part of this program is the player. It will play your final
animation. There is also included a batch program which can be run
from the DOS prompt that will do the same.
The program has been designed such that certain keyboard and mouse
operations will be interpreted in a consistent manner. Following is a list
of these behaviors:
Left Mouse Button - generally used to select things or to edit
points.
Right Mouse Button - use this to cancle an operation. For instance
if you are rotating some points simply press the
right button to cancle the operation.
When menu-item has text displayed in a grayish fashion, this indicates
that it is not selectable right now.
────────────────────────────────────────────────────────────────────────────
5.2 The Main Screen
────────────────────────────────────────────────────────────────────────────
When you start the program you should see a menu in the top of the screen
and an empty black area below. The menu has several buttons:
First is the "DISK" button. Pressing this will make another window pop up.
From here you can choose to load a new animation, save a loaded animation
or save aniamtion data to a text-file.
You should start this program with loading an animation. So, press load and
choose an .ANI file from the file-list.
The next button is "START" and "END" button. These button determine which
frames the player show animate. You can choose the starting ("START") and
the ending ("END") frame. Usually you would like to display the whole
animation, so if not all ready set, set "START" (by clicking and entering
a number) to 1 and "END" to the last frame (look at the MAX value).
Below is an "ADD" button. To add a new frame to your animation, click on
this button. The new frame will be placed right after the current frame
and will be an exact copy of it. Jump a frame ahead and go to editor screen
to edit your new frame! In other words, the frame you add, is added next
to the current frame. The program doesn't automatically jump to the new
frame.
You can also "DELETE" a frame or "COPY" a frame to your current frame.
Copying also copy face's z-values and visibility-data!
In the middle of the screen, there are three more buttons (or gadgets).
On the top is the "POS:". Click in the field to the right and enter a
new frame number you would like to jump to. For this to happen you must
of course have more than one frame in your animation. The "POS:" will
allways show the current frame position.
Below the "POS:" gadget to the left is the "RATE:". This determines at
which rate the final animation will be played. The number is 'frames/second'
(or just around that number) and you can max enter the number 70 -
which gives you 70 updates pr. second!
Next it the "STEP:" gadget. This is, unlike the two other gadgets, bound
to the current frame. For each frame you can determine how many intervening
frames (or steps) the computer should calculate before it displays the
next frame. This is a sort of "morph-value". By choosing a higher value
more intervening pictures are displayed in the final animation between two
frames. The step number tells only how many pictures there are between the
current and the next frame - so each frame must have its own step-value.
Notice that the number of steps does not change the screen-update
rate at any point! The rate is global and cannot change during the
animation.
On the right side of the screen are four more buttons. The first is
the "INFO" button, which display some useless information about the
program. Then there is the "QUIT" button (you won't be needing that right
now :-> ) and there is an "EDIT" button. Press this and you enter the
"Editor Screen" section - described below.
Finally there is the "PLAY" button. Press this to test and watch the
final animation run. When you press it the screen will flicker a bit,
because the screen-mode is changed to 320x200, 256 colours. On slow
computers you might also have to wait a bit before the whole lot begins.
Then you should, hopefully, be able to watch your animations. Notice that
this animator is able to run at 70 screen-updates pr. second, depending on
the number of frames - this is better than television and video.
Right below the buttons are a black box. This is actually a slider which
can be used to scroll between frames. As you add more frames to your
animation the scroll-bar (the black thing) will change in size, letting
you slide it horizontally by pressing the left mouse-button over it and
moving the mouse sideways.
Below the menu is the display screen. Here you can watch the frames your
animation consist of. Don't mind that the colours look a bit strange.
This is because they are drawn on a 16-colour screen and not on
a 256-colour screen, which the actual animation is rendered on.
And be aware of the difference in the two resolutions which are used. The
editor's 640x480 screen looks pretty nice - but the final animation will be
displayed on a 320x200 pixels screen. This can dramatically reduce the
details and granularity of the display! Take care when you edit your first
few frame to get the final look perfect.
────────────────────────────────────────────────────────────────────────────
5.3 The Editor Screen
────────────────────────────────────────────────────────────────────────────
Let's go trough some of the basic stuff about the structure of the animation.
As you might have guessed by now, an animation consists of one or more
polygons, or as we call it faces. Each face can be described as a number
of coordinates, a color, a name and so on.
But in order to make editing easier and to get a good grip of the many
faces to be drawn, we introduce objects. Objects are conceptual and does
not have any coordinates, thus are not rendered on the screen. They serve
one goal: to group faces.
An animation is structured hierarchially - this is, faces are arranged
into a ranked tree structure. At the top of the hierachy is the root,
containing all other faces. The root expands to faces or catagories
of faces (called objects) available to the user.
Objects themselves can be related hierarcially. Each successive step takes
the user one level down in the hierachy of the animation until the user
reaches one or more faces. The hierarchial relationship of objects
determines in part how the user navigates through the animation.
If you by now is familiar with the editor (having tried it out and found
it quite simple to use) jump immediately to the "The Keys and IMPORTANT
EXTRA FEATURES" section below! It should be read!
On the lower half of the screen you can see a wire-frame version of the
current frame. Faces can be shown in tree different colours. Very dark
gray lines are faces which are invisible. Faces that are plain gray are
faces which have no selected points. Faces in white all have one or more
(perhaps all) of their points selected. A selected point is shown with
a little red cross over it.
Selected points are the key issue in the editor screen. When you wish to
edit a frame it is not wise to edit all coordinates (or points) on the
screen at the same time. You must reduce the number of point you are
currently working on. You do that by selecting only those points you
need to edit right now. These are referred as 'selected points' in the
following.
But let's have a look on the menu...
First you should see the "VIEW" button at the top of the menu. Choosing
this will cause a window to pop up. The first line the list displayed is
the current object and under it are its children. Double-click on the
first line to step up in the tree-structure. Double-click on "(OBJ)" objects
to step down in the tree-structure! Choose "OK" and the highlighted
item will be displayed in another window. Here you are able to
edit all its data. Such as name, colour, editor-colour, visibility
and z-value.
For a face the following values can be altered:
You can change its name. Or its colour. The colour is an index between
0 and 255. Enter a new number and press 'enter'. The actual colour is
shown an the little box next to it. Press "CHANGE" to edit that
colour's RGB-values! More than one face can have the same colour so be
sure not to change RGB-values that might be shared.
The "Editor" is the colour the face is rendered with at the main screen.
Click on the arrow-down button and choose a colour. Since the main screen
has 16 colours, and not 256, a seperate colour has to be assigned.
"Visible" can be toggled on and off. Invisible faces are not rendered in
the current frame. This, and the z-value, can be changes for each frame.
The "Z-value" is the order which faces are drawn is. Faces with high
z-values are rendered first. Faces are rendered in descending order -
thus faces with lower z-values overlap faces with higher z-values.
As you add more frames to your animation you might want to change the
visibility or the display order of individual faces. You can do this by
selecting the frame you wish to alter. The choose "VIEW" and find the
face you wish to change. Change the "Z-value" or toggle "Visible" on or
off.
The "SELECT" button lets you change the currently selected points.
The "Add" button adds points to the selection. If you "Add" an object all
the points of the object's children will also be added.
The button "Remove" removes points. "All" adds all points from all faces
to the selection and "None" unselects all.
Faces that have one or more of its points selected are shown with a
little marker on its left side.
Look at the section "The Keys and IMPORTANT EXTRA FEATURES" below for
more select functions.
Next is three ZOOM buttons. You can zoom or enlarge the display area
to get a better view of your frame's details. It's easier to edit this
way. The first zoom-button reads "NO" (ZOOM, that it). To show
the wire-frame in full-size press this button. On the other hand, if
you wish to zoom on the wireframe click "ZOOM *2" to get double size or
"*4" to get four times the size. Move the mouse down in the display area
when button is depressed and choose the zoom-area by clicking on the left
mouse-button.
On the lower menu-line you will find a number of point-manipulation tools.
These tools work on points that are selected.
The "Edit" button is the only which manipulates a single points only. You
can drag/move a point by clicking the left mouse-button near by and move
the mouse. Easy.
The other tools are used for moving, rotating and scaling. These tools also
only works on selected points. A blue rectangle will encapsulate all
points to give you an idea of what is going on. Move the mouse to determine
rotation-angle or scale-factor. Click the left one again to do the
operation!
The "Copy" button can copy points from another frame. Select one or more
points. Press the "Copy" button and enter a new frame-number.
The "Undo" helps you when a mistake has been done. Simply press the undo
button to correct a mistaken operation. Press the undo button again to
undo the undone!
────────────────────────────────────────────────────────────────────────────
5.4 The Keys and IMPORTANT EXTRA FEATURES
────────────────────────────────────────────────────────────────────────────
Here is some important extra features!!!!!!
Block-Modes:
You can add points to your current selections by moving the mouse down
below the menu, holding down a ALT-key down, clicking on the left mouse-
button and dragging the box over the points you wish to add to your
selection. Now release the ALT-key. And the points which lies inside
the rectangle will be added to your selections.
In the very same way, you can remove points from your selections by
holding down a CTRL key instead.
Likewise you can use the left shift key to do fast face selections. Move
the mouse over one of the points in the face you wish to select, hold
down the left shift key and press the left mouse button. A face with
all its points selected will be completely unselected, else all
points in the face are add to your selected points pool.
F-Keys:
F1 = Like the "NO ZOOM" button.
F2 = The "ZOOM *2" button.
F3 = The "ZOOM *4" button.
F4 = A special funtion - a "Zoom To Fit" function, which finds the best
way to zoom in on your current selections. It's a quick way to get
the best view of the wire-frame!!
Gray ARROW-keys:
You can scroll/pan a zoomed area. Use the cursor/arrow keys to move
around on a zoomed area.
+/- keys:
Use the + and the - keys to quickly jump one frame forward or on frame
back. This works on both screens.
Changing frame position:
On the main screen you can also use the gray arrow-keys:
ARROW-LEFT to go one frame back and ARROW-RIGHT to advance one frame.
ARROW-DOWN, SHIFT-LEFT or HOME-key to jump to the first frame; use
ARROW-UP, SHIFT-RIGHT or END-key to jump to the last frame.
Or PAGE-UP to advance 10 frames and PAGE-DOWN key to go back 10 frames.
ENTER-key:
The ENTER-key will switch back and forth between the main screen and
the editor screen.
MACRO-recorder:
You probably wonder what the "1","2"... buttons in the selection
window are for? They are primitive macro recorders. Press the "SELECT"
button. Select one or more faces which you often use and edit. Click on
the "1" button. Now leave the selection window and press "NONE" at the
editor screen. There are currently no selected points. Now press the "1"
key on your keyboard, and there is the selections you just chose in the
selection window! In this way, frequently used selections can be stored
and easily recalled. Remember that you don't actually store coordinates,
only selection status.
Macro-definitions are not saved along with the file.
And remember that most menu-items has a keyboard shortcut/hotkey.
────────────────────────────────────────────────────────────────────────────
6. Technical Stuff
────────────────────────────────────────────────────────────────────────────
This program is written in Borland Pascal V7.0. It uses DPMI to utilize
as much memory as possible.
Pascal may sound a bit slow for you, if you are a hard-core assembly coder,
but of course, the actual animation-player is written in fast assembly
using 80386 opcodes.
Playing an animation may take up quite some memory. 3Mb of memory is
recommended if you plan on making large animations. The great memory
consumption is only because some of the stuff is precalculated
before the animation is running. The optimal memory needs are not more
than the size of the .ANI file and the video memory! But I had to speed
some things up.
The biggest problem was actually that the player had to draw n-sided
polygons, which isn't the fastest to do on a PC. Often people split their
polygons up in triangles to make it easier, but this didn't seem do be the
way - it is rather slow. However, I managed to code one using another
strategy, and it seem to be pretty fast. I think it can do an amazing
4200 fairly small n-sided polygons pr. second on my '486 40Mhz with a
VERY slow VGA card!
────────────────────────────────────────────────────────────────────────────
7. Bugs and Wishes
────────────────────────────────────────────────────────────────────────────
Oh no, this is gonna be rough. BUGS!
There must be tons of them. I haven't really done any bug-testing at all.
One of the biggest griefs is that, if the program runs into an error it
probably will halt and write "UNHANDLED EXCEPTION 216" or something!
And everything is lost!
Known bugs:
* To my surprise the aspect of the two screen-resolutions I use are
quite different. This means that the animations looks like it has been
squeezed a bit vertically when it's played!
* There are some limitations to the player's polygon-drawer. I don't think
that no-one ever will experience any problems though, since faces has
to be really complex for things to get into an overflow.
* Try to rotate some point an arbitrary angle and then rotate them back.
Bommer! Typical when you're using high-level language - some flot-point
round off messes everything up! Assembly rulez!
* On my VGA-card the 'GetImage'-function makes some really strange tiny
lines on the screen which are never removed! (error in the BGI, I guess!)
If you bump into a bug, please report it to me (address later on).
Wishes... what could be improved? Here are some wild hopes which I
probably won't implement in the near future:
* Points, lines, circles, spheres and graphs.
* Shading and texture-mapping.
* Curved, and not linear, step-calculation.
* Grabbing feature for DeLuxe Paint ][ (Animator) or FLIC format.
* Get it working on all machines :-}
────────────────────────────────────────────────────────────────────────────
8. The End
────────────────────────────────────────────────────────────────────────────
To end the introduction:
After "Another world" another game were released called "Out of this world"
which were much the same - but with better graphics! But I haven't actually
seen any games using this concept since :-( ! Were no-one as excited as I
was? Anyway, I still went on creating this tool, because it can be used
to other things than games. What about demos, introductions to games (still
can't get "Another world" out of my head!) But even though I don't really
think I will make any game of that sort then it didn't last very long before
another game caught my interest. "Alone in the dark" (I & II) ! Another
cool way to use solid vectors. Now in 3D space! What a rush! So in
a few months you might see a shareware version of my first version of
"The 'Alone in the dark' developer kit" !!
How to contact me:
If you for any reason wish to contact me, write to:
Bjarke Viksoe
Norrebred 139
2625 Vallensbaek
Denmark
Or e-mail me in 1994 to : dat92230@rix02.lyngbyes.dk
If you wish to obtain the source code for this baby please use e-mail. If
you use snail-mail, please send stamps and disks along. Sources are for
free.
┌───────────────────────────┐
│Wanna beat orgasm │ Bjarke Viksoe
│ try bit-pushing│ dat92230@rix02.lyngbyes.dk
└───────────────────────────┘